projects
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e0c6ac6
)
(field-at-point): New function.
author
Nick Roberts
<nickrob@snap.net.nz>
Wed, 10 May 2006 00:32:34 +0000
(
00:32
+0000)
committer
Nick Roberts
<nickrob@snap.net.nz>
Wed, 10 May 2006 00:32:34 +0000
(
00:32
+0000)
lisp/subr.el
patch
|
blob
|
history
diff --git
a/lisp/subr.el
b/lisp/subr.el
index d4167724ca02953833a45327d96f847955a04d19..1c7e23cfcd17488fd88b5b42ce46df0a5032df78 100644
(file)
--- a/
lisp/subr.el
+++ b/
lisp/subr.el
@@
-1956,6
+1956,13
@@
Otherwise, return nil."
"Return non-nil if OBJECT is one of the two canonical boolean values: t or nil."
(memq object '(nil t)))
+(defun field-at-point (pos)
+ "Return the field at position POS, taking stickiness etc into account"
+ (let ((raw-field (get-char-property (field-beginning pos) 'field)))
+ (if (eq raw-field 'boundary)
+ (get-char-property (1- (field-end pos)) 'field)
+ raw-field)))
+
\f
;;;; Support for yanking and text properties.